package io.github.lee.app.unsplash.repository.api

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import io.github.lee.app.unsplash.repository.domain.Photo
import io.github.lee.app.unsplash.repository.domain.Topic
import io.github.lee.app.unsplash.repository.domain.UnsplashResponse
import retrofit2.Retrofit
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query



interface TopicApi {

    @GET("topics")
    suspend fun topicList(
        @Query("page")page:Int=1,
        @Query("per_page")size:Int=10,
        @Query("order_by")orderBy:String?="position",
    ): UnsplashResponse<List<Topic>>


    @GET("/topics/{topicId}/photos")
    suspend fun topicPhotoList(
        @Path("topicId") topicId: String,
        @Query("page") page: Int,
        @Query("per_page") size: Int,
        @Query("orientation") orientation: String? = null,
        @Query("order_by") orderBy: String?="latest",
    ): UnsplashResponse<List<Photo>>
}